package com.sunyard.dal.mapper;

import com.sunyard.dal.bo.finger.FingerCopyQueryBO;
import com.sunyard.dal.entity.FingerCopy;
import com.sunyard.dal.entity.FingerCopyExport;
import com.sunyard.dal.entity.FingerCopyVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FingerCopyMapper {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(FingerCopy record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(FingerCopy record);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    FingerCopy selectByPrimaryKey(Integer id);

    FingerCopyVo selectById(Integer id);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(FingerCopy record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(FingerCopy record);

    /**
     * 通过指纹id和指纹雷赐你查询指纹信息
     *
     * @param fingerId fingerId
     * @param type     [id, type]
     * @return FingerCopy
     * @author: guangw.dang
     * @Date: 2022/7/13 15:14
     **/
    FingerCopy selectByFingerId(@Param("fingerId") Integer fingerId, @Param("type") String type);

    /**
     * 分页查询指纹审核信息
     *
     * @param copyQueryBO [copyQueryBO]
     * @return List<FingerCopy>
     * @author: guangw.dang
     * @Date: 2022/7/13 16:12
     **/
    List<FingerCopy> getFingerCopyByPage(FingerCopyQueryBO copyQueryBO);

    /**
     * 
     * @author tsz
     * @date 2022/12/14
     * @param : copyQueryBO
     * @return 
     * @throws 
    */
    List<FingerCopyExport> fingerAuditExport(FingerCopyQueryBO copyQueryBO);

    /**
     * 通过指纹类型查询是否存在新增审核
     *
     * @param opId
     * @param type [opId, type]
     * @return FingerCopy
     * @author: guangw.dang
     * @Date: 2022/7/13 17:48
     **/
    FingerCopy getFingerByType(@Param("opId") String opId, @Param("type") String type);

    //获取当前机构下指纹未审核的数量
    int getFingerAuditCount(@Param("orgIds") List<String> orgIds);

    int getCopyCount(Integer fingerId);
}